package IOStreamTest.ObjectStream;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

/*
反序列化
 */
public class ObjectInputStreamTest1 {
    public static void main(String[] args) {
       ObjectInputStream ois = null;
        try {
            ois = new ObjectInputStream(new FileInputStream("Students"));
            Object o = ois.readObject();
            System.out.println(o);

        } catch (IOException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } finally{
            if (ois != null) {

            }
        }
    }
}
